<template>
  <div class="pagination">
    <el-pagination background layout="total,prev, pager, next,jumper" :total="total" :pageSize="pageSize" :currentPage="currentPage" @current-change="changePageNum">
    </el-pagination>
  </div>
</template>

<script>
  export default {
    props: {
      total: {
        type: Number,
        default: 100
      },
      pageSize: {
        type: Number,
        default: 10
      },
      currentPage: {
        type: Number,
        default: 1
      }
    },
    methods:{
      changePageNum(page){
                // 自定义事件  
                this.$emit("changePageNum",page)
      }
    }

  }
</script>
<style lang="less" scoped>
  .pagination {
    text-align: center;
    margin-top:50px;
  }
  .el-pagination{
  }
</style>